package cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment4Refactoring.bean;

import java.util.LinkedList;
import java.util.List;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

import cn.edu.nju.software.zp13.client.assignment3.xmlNodeEntity.util.ScoreType;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment3Refactoring.bean.Score;

@XmlType(name = "课程成绩类型")
public class CourseScoreWithManyScores {
	private String courseId;
	private ScoreType st;
	private List<Score> scores;

	public CourseScoreWithManyScores() {
		scores=new LinkedList<>();
	}

	public CourseScoreWithManyScores(String courseId, ScoreType st, List<Score> scores) {
		super();
		this.courseId = courseId;
		this.st = st;
		this.scores = scores;
	}

	public String scoreTypeToString() {
		return st.toString();
	}

	@XmlElement(name = "成绩")
	public List<Score> getScore() {
		return scores;
	}

	public void setScore(List<Score> scores) {
		this.scores = scores;
	}

	@XmlAttribute(name = "成绩性质")
	public ScoreType getSt() {
		return st;
	}

	public void setSt(ScoreType st) {
		this.st = st;
	}

	@XmlAttribute(name = "课程编号")
	public String getCourseId() {
		return courseId;
	}

	public void setCourseId(String courseId) {
		this.courseId = courseId;
	}
}
